#include<bits/stdc++.h>
using namespace std;
//#define int long long
signed main() {

	char op;

	string s;
	cin >> s;
	double l = 0, r = 0;

	double xiShuL = 0;
	string t;
	int i = 0;
	if ('a' <= s[i] && s[i] <= 'z') {
		op = s[i];
		xiShuL = 1;
	}

	else
		t += s[i];
	for (i = i + 1; s[i] != '='; i++) {
		if (s[i] == '+' || s[i] == '-') {
			if (!t.empty())
				l += stod(t);
			t = s[i];
			continue;
		}
		if ('a' <= s[i] && s[i] <= 'z') {
			op = s[i];
			if (t.size() == 1 && (t[0] == '+' || t[0] == '-')) {
				t += "1";
			}
			xiShuL += stod(t);
			t = "";
			continue;
		}
		t += s[i];
	}

	if (!t.empty())
		l += stod(t);

	double xiShuR = 0;
	t = "";
	i++;
	if ('a' <= s[i] && s[i] <= 'z') {
		op = s[i];
		xiShuR = 1;
	}

	else
		t += s[i];

	for (i = i + 1; i < s.size(); i++) {
		if (s[i] == '+' || s[i] == '-') {
			if (!t.empty())
				r += stod(t);
			t = s[i];
			continue;
		}
		if ('a' <= s[i] && s[i] <= 'z') {
			op = s[i];
			if (t.size() == 1 && (t[0] == '+' || t[0] == '-')) {
				t += "1";
			}
			xiShuR += stod(t);
			t = "";
			continue;
		}
		t += s[i];
	}
	if (!t.empty())
		r += stod(t);

	double ans = (r - l) / (xiShuL - xiShuR);
	cout << fixed << setprecision(3) << op << "=" << (fabs(ans - 0) < 0.000001 ? 0 : ans);
	return 0;
}
